<template>
  <div id="header" class="">
    <div class="header_title">
      <span class="title">吉房物业</span>
      <i class="user" @click="loginout()"></i>
    </div>
  </div>
</template>
<script>
import store from "@/store";
export default {
  name: "Header",
  props: {},
  data: function () {
    return {};
  },
  methods: {
    loginout() {
      store.commit("LOGOUT");
      this.$router.push('/login')
      // window.location.reload()
    },
  },
};
</script>
<style lang="scss">
.header_title {
  position: relative;
  height: 0.846rem;
  line-height: 0.846rem;
  font-size: 0.346rem;
  color: #fff;
  background-color: #469464;
}

.header_title .title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header_title .user {
  position: absolute;
  top: 0.09rem;
  right: 0.18rem;
  background: url("../assets/images/user.png") no-repeat center;
  width: 0.46rem;
  height: 0.46rem;
  background-size: 100%;
}
</style>
